home *** CD-ROM | disk | FTP | other *** search
- 5 rem copyright 1994 - compute publications intl ltd - all rights reserved
- 10 rem directory manager v1.0/930315
- 20 poke53280,11:poke53281,0:poke650,128:goto7000
- 50 i$=ar$(x1,.):ar$(x1,.)=ar$(x2,.):ar$(x2,.)=i$:i$=ar$(x1,1)
- 60 ar$(x1,1)=ar$(x2,1):ar$(x2,1)=i$:return:rem swap
- 70 get#15,s$:ifs$="0"thenreturn
- 80 print"[147]disk error:[146] ";
- 90 prints$;:ifs$<>chr$(13)thenget#15,s$:goto90
- 100 close8:close15:end
- 110 clr:dimi$,j$,k$,i,j,p,m,x1,x2,pg,s,s$,qt$,mt$,dl$,bl$,ar$(144,1)
- 120 s$=chr$(0):fori=1to16:mt$=mt$+chr$(160):next:fori=1to19:bl$=bl$+" ":next
- 121 qt$=chr$(34):dl$=s$+s$+s$+mt$:fori=1to11:dl$=dl$+s$:next
- 122 j$="12345678":j$=j$+j$:i$=left$(j$,3):k$=left$(j$,11)
- 130 print"[147]"tab(7)"*** reading directory ***"
- 140 open15,8,15,"i0":open8,8,8,"#":s=1:m=0
- 150 print#15,"u1";8;0;18;s:gosub70
- 160 fori=0to7:print#15,"b-p";8;i*32+2
- 170 j=usr(.):ifjthen190
- 180 m=m+1:ar$(m,1)=i$+k$:ar$(m,.)=j$
- 190 next
- 200 print#15,"b-p";8;0:get#8,s$:ifs$=""thenget#8,s$:s=asc(s$):goto150
- 210 close8:close15:ifm=0thenprint"[147]no files in directory.":end
- 220 p=1:gosub5000
- 230 gosub6000
- 240 poke214,p-pg:print:print">[157]";
- 250 ifpeek(198)=0then250
- 260 geti$:ifi$=""then400
- 270 ifi$="[145]"then430
- 280 ifi$=""then380
- 290 ifi$=chr$(13)then500
- 300 ifi$="+"then460
- 310 ifi$="-"then480
- 320 ifi$="s"then760
- 330 ifi$="w"then800
- 340 ifi$="r"then110
- 350 ifi$="e"then610
- 360 ifi$="q"thenprint"[147]";:end:goto220
- 370 goto250
- 380 ifp<>pgthenp=pg:print" ":goto240
- 390 p=1:goto230
- 400 print" ":p=p+1:ifp>mthenp=m:goto240
- 410 ifp>pg+22then230
- 420 goto240
- 430 print" ":p=p-1:ifp<1thenp=1:goto240
- 440 ifp<pgthen230
- 450 goto240
- 460 print" ":p=pg+23:ifp>mthenp=m
- 470 goto230
- 480 print" ":p=pg-23:ifp<1thenp=1
- 490 goto230
- 500 poke214,p-pg:print:print">"qt$ar$(p,.)qt$"[145]"
- 510 ifpeek(198)=0then510
- 520 geti$:ifi$<>""andi$<>"[145]"andi$<>chr$(13)then510
- 530 print" [145]":ifi$=chr$(13)thenprint" "qt$ar$(p,.)qt$:goto240
- 540 ifi$=""then580
- 550 ifp=1then500
- 560 x1=p:p=p-1:x2=p:gosub50:ifp<pgthengosub6000:goto500
- 570 printbl$"[145]":print" "qt$ar$(p+1,.)qt$:poke214,p-pg:print:printbl$:goto500
- 580 ifp=mthen500
- 590 x1=p:p=p+1:x2=p:gosub50:ifp>pg+22thengosub6000:goto500
- 600 printbl$"[145]":print" "qt$ar$(p-1,.)qt$:poke214,p-pg:print:printbl$:goto500
- 610 poke214,14:print:print,," edit filename":j$=ar$(p,.)
- 620 i=0
- 630 poke214,16:print:print,,qt$j$qt$" ":j=len(j$)
- 640 printspc(20+i)" [163] [145]"
- 650 ifpeek(198)=0then650
- 660 geti$:ifi$=""andi<>len(j$)theni=i+1:goto640
- 670 ifi$="[157]"andi>0theni=i-1:goto640
- 680 if(asc(i$)and127)=19thenj$="":poke214,16:print:print,,bl$:print,,bl$:goto620
- 690 ifasc(i$)=20andithenj$=left$(j$,i-1)+right$(j$,j-i):i=i-1:goto630
- 700 ifasc(i$)=148andj<16thenj$=left$(j$,i)+" "+right$(j$,j-i):goto630
- 710 ifasc(i$)=13andj$<>""thenar$(p,.)=j$:gosub5000:goto230
- 720 ifasc(i$)=13thengosub5000:goto230
- 730 if(asc(i$)and96)=0ori>15then650
- 740 ifi=jthenj$=j$+i$:i=i+1:goto630
- 750 j$=left$(j$,i)+i$+right$(j$,j-i-1):i=i+1:goto630
- 760 print" ":poke214,13:print:print,," ** sorting **":ifm<3then220
- 770 forx1=1tom-1:x2=x1:fori=x2tom:ifar$(i,.)<ar$(x2,.)thenx2=i
- 780 next:ifx2>x1thengosub50
- 790 next:goto220
- 800 poke214,14:print:print,," write directory!"
- 810 print,," *are you sure? y/n"
- 820 ifpeek(198)=0then820
- 830 geti$:ifi$="n"then220
- 840 ifi$<>"y"then820
- 850 print"[147]"tab(7)"*** writing directory ***"
- 860 printtab(11)"[163][163][163][163][163][163][163] [163][163][163][163][163][163][163][163][163]":open15,8,15,"i0"
- 870 restore:open8,8,8,"#":p=0:s=1
- 880 fori=0to7:print#15,"b-p";8;i*32+2
- 890 p=p+1:ifp>mthenprint#8,dl$;:goto920
- 900 print#8,left$(ar$(p,1),3)ar$(p,.)right$(mt$,16-len(ar$(p,.)));
- 910 print#8,right$(ar$(p,1),11);
- 920 next:i=s:print#15,"b-p";8;0:ifp<mthenreads:print#8,"";chr$(s);
- 930 ifp<mthenprint#15,"u2";8;0;18;i:gosub70:goto880
- 940 print#8,chr$(0);chr$(255);:print#15,"u2";8;0;18;i
- 950 close8:close15:goto220
- 5000 print"[147]",," directory manager"
- 5010 print,," by steven w. reid"
- 5020 print,," use cursor keys to"
- 5030 print,," move, return to"
- 5040 print,," pick up/drop file."
- 5050 print,," r- read directory"
- 5060 print,," w- write directory"
- 5070 print,," e- edit filename"
- 5080 print,," s- sort directory"
- 5090 print,," q- quit program"
- 5100 return
- 6000 print"":pg=int((p-1)/23)*23+1:fori=pgtopg+22
- 6010 printbl$"[145]":ifi<=mthenprint" "qt$ar$(i,.)qt$;
- 6020 print:next:poke198,0:return
- 7000 restore:fori=0to-1step0:readi:next:a=828:c=0
- 7010 readd:c=c+d:ifd=>0thenpokea,d:a=a+1:goto7010
- 7020 ifcthenprint"data error":end
- 7030 poke785,60:poke786,3:goto110
- 9000 data 4,7,10,13,16,2,5,8,11,14,17,3,6,9,12,15,18,-1
- 10000 data 160,002,177,045,153,096,000
- 10001 data 200,192,005,208,246,162,008
- 10002 data 032,198,255,160,000,032,207
- 10003 data 255,208,009,032,204,255,169
- 10004 data 001,168,076,145,179,145,099
- 10005 data 200,032,207,255,145,099,200
- 10006 data 032,207,255,145,099,160,009
- 10007 data 177,045,153,089,000,200,192
- 10008 data 012,208,246,160,000,032,207
- 10009 data 255,145,099,200,192,016,208
- 10010 data 246,136,177,099,201,160,208
- 10011 data 003,136,016,247,200,152,160
- 10012 data 009,145,045,160,016,177,045
- 10013 data 153,082,000,200,192,019,208
- 10014 data 246,160,000,032,207,255,145
- 10015 data 099,200,192,011,208,246,032
- 10016 data 204,255,169,000,168,076,145
- 10017 data 179,-16185
-